package com.waymap.common;


import io.jsonwebtoken.Claims;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
@SuppressWarnings("all")
public class Constant {

    public static  final String Queue_Name="wmsQueue";

    //token验证
    public static final String ISSSUER = "waymap";
    public static final String TOKEN_SECERT = "waymap@netsuite@wms@201808221666";            //密匙
    public static final long TOKEN_TTL = 3 * 60 * 60 * 1000;     //token有效时间 3小时

    public static final int RESCODE_REFTOKEN_MSG = 1006;        //刷新TOKEN(有返回数据)
    public static final int RESCODE_REFTOKEN = 1007;            //刷新TOKEN

    public static final int TOKEN_ERRCODE_NULL = 4000;            //Token不存在
    public static final int TOKEN_ERRCODE_EXPIRE = 4001;            //Token过期
    public static final int TOKEN_ERRCODE_FAIL = 4002;            //验证不通过


    public static final String NO = "0";  //无效
    public static final String YES = "1"; //有效

    private int errCode;

    private boolean success;

    private Claims claims;

    public static String getQueue_Name() {
        return Queue_Name;
    }

    public static String getISSSUER() {
        return ISSSUER;
    }

    public static String getTokenSecert() {
        return TOKEN_SECERT;
    }

    public static long getTokenTtl() {
        return TOKEN_TTL;
    }

    public static int getRescodeReftokenMsg() {
        return RESCODE_REFTOKEN_MSG;
    }

    public static int getRescodeReftoken() {
        return RESCODE_REFTOKEN;
    }

    public static int getTokenErrcodeNull() {
        return TOKEN_ERRCODE_NULL;
    }

    public static int getTokenErrcodeExpire() {
        return TOKEN_ERRCODE_EXPIRE;
    }

    public static int getTokenErrcodeFail() {
        return TOKEN_ERRCODE_FAIL;
    }

    public static String getNO() {
        return NO;
    }

    public static String getYES() {
        return YES;
    }

    public int getErrCode() {
        return errCode;
    }

    public void setErrCode(int errCode) {
        this.errCode = errCode;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public Claims getClaims() {
        return claims;
    }

    public void setClaims(Claims claims) {
        this.claims = claims;
    }
}
